package com.atguigu.test;

import com.atguigu.aop.MathCalc;
import com.atguigu.bean.Person;
import com.atguigu.config.MainConfig4;
import com.atguigu.config.MainConfigAop;
import org.junit.Test;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

public class IOCTestAOP {
    AnnotationConfigApplicationContext applicationContext =
            new AnnotationConfigApplicationContext(MainConfigAop.class);

    @Test
    public void test01() {
        MathCalc mathCalc = applicationContext.getBean(MathCalc.class);
        int result = mathCalc.div(4, 0);


    }
}
